package cn.wx.scholar.core.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import cn.wx.scholar.core.entity.Paper;
import cn.wx.common.persistence.base.BaseService;
import cn.wx.scholar.core.mapper.PaperMapper;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author  
 * @since 2018-07-17
 */
@Service
@Transactional
public class PaperService extends BaseService<Paper, PaperMapper> {
	
	/**
	 * 根据id查询论文
	 * 获取论文摘要
	 */
	public Paper queryOneByFId(Long fId) {
		return simpleMapper.queryOneByFId(fId);
	}
	
	/**
	 * 插入论文领域
	 */
	public void createPaperFos(List<String> foses) {
		simpleMapper.createPaperFos(foses);
	}
	
	/**
	 * 查询当前领域是否已经存在库里面
	 */
	public Integer queryOneFos(String fos) {
		return simpleMapper.queryOneFos(fos);
	}
}
